//
//  WPBaseNavigationController.m
//  wobingwoyi
//
//  Created by WGP on 16/7/21.
//  Copyright © 2016年 WGP. All rights reserved.
//

#import "WPBaseNavigationController.h"


@interface WPBaseNavigationController ()

@end

@implementation WPBaseNavigationController

//当第一次使用该类活该类的子类的时候调用
+(void)initialize
{
    if (self == [WPBaseNavigationController self]) {
        
    }
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationBar.translucent = NO;
    
    UINavigationBar *navBar = self.navigationBar;
    [navBar setBarTintColor:GlobalColor];
    
    //设置全局导航条的返回按钮
    UIImage *backImage = [[UIImage imageNamed:@"fanhui"]
                          imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    [navBar setBackIndicatorImage:backImage];
    [navBar setBackIndicatorTransitionMaskImage:backImage];
    
    //        设置导航条标题颜色
    NSMutableDictionary *attributes = [NSMutableDictionary dictionary];
    attributes[NSForegroundColorAttributeName] = RGB_SAME(51);
    attributes[NSFontAttributeName] = [UIFont systemFontOfSize:18];
    [navBar setTitleTextAttributes:attributes];
}


@end
